<?php

namespace App\Utils;


class Push
{
    public static function get($isClient = false)
    {
        $config=config('push.JPush');
        if ($isClient) {
            $client = new \JPush\Client($config['app_key'], $config['master_secret'], storage_path('logs/report.log'));
            return $client;
        } else {
            $client = new \JPush\Client($config['app_key'], $config['master_secret'], storage_path('logs/push.log'));
            $push = new RetailPushPayload($client);
            $push->options();
            return $push;
        }
    }
}
